-- avalon_cannon
-- created by dengc
-- 刷新阿瓦隆巨炮技能

return {
    -- 学习技能
    apply = function(id, info)
        -- 设置技能
        local skills = EngineeringManualM.fetchAvalonSkills();
        AvalonCannonM.setCannonSkills(skills);
    end,

    -- 二级界面描述
    desc = function(id, info)
        -- 显示下一级的效果，如果满级，那么显示满级的效果
        local level = EngineeringManualM.getKnowledgeLevel(id);
        if not EngineeringManualM.isAchieveMaxLevel(id) and not EngineeringManualM.isUnlimited(id) then
            level = level + 1;
        end

        local skillId = SkillM.findSkill(info[1], level);

        -- 匹配掉颜色信息
        local skillDesc = SkillM.getSkillDesc(skillId);
        skillDesc = string.gsub(skillDesc, "%[.-%]", "") .. "\n";

        return skillDesc;
    end,
};
